#!/usr/bin/env python
# -*- coding: utf-8 -*-
#coding=utf8

# 本文件由自动工具 proto.py 自动生成，请勿修改
# filename msg9000_csbuf.py
# package ptl

from ptl.base_csbuf import *


# message Req9001
class Req9001:
	def __init__(self):
		self.protoid = 9001
		self.propId = 0

	def Marshal(writer):
		writer.setUint32(self.propId, 1)

	def Unmarshal( reader):
		self.propId = reader.getUint32(1)
# message Resp9001
class Resp9001:
	def __init__(self):
		self.protoid = 9001
		self.status = 0
		self.counts = 0
		self.remove = FightPropInfo()
		self.add = FightPropInfo()

	def Marshal(writer):
		writer.setUint8(self.status, 1)
		writer.setUint32(self.counts, 2)
		writer.setMessage(3)
		self.remove.Marshal(writer)
		writer.endSetMessage()
		writer.setMessage(4)
		self.add.Marshal(writer)
		writer.endSetMessage()

	def Unmarshal( reader):
		self.status = reader.getUint8(1)
		self.counts = reader.getUint32(2)
		reader.getMessage(3)
		self.remove.Unmarshal(reader)
		reader.endGetMessage()
		reader.getMessage(4)
		self.add.Unmarshal(reader)
		reader.endGetMessage()
# message Req9002
class Req9002:
	def __init__(self):
		self.protoid = 9002
		pass

	def Marshal(writer):
		pass

	def Unmarshal( reader):
		pass
# message Resp9002
class Resp9002:
	def __init__(self):
		self.protoid = 9002
		self.value = []

	def Marshal(writer):
		countvalue = len(self.value)
		writer.setArray(countvalue, 1)
		for i in range(countvalue):
			writer.setMessage(0)
			self.value[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = FightPropInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.value.append(msg)
# message Req9003
class Req9003:
	def __init__(self):
		self.protoid = 9003
		pass

	def Marshal(writer):
		pass

	def Unmarshal( reader):
		pass
# message Resp9003
class Resp9003:
	def __init__(self):
		self.protoid = 9003
		self.status = 0
		self.info = []

	def Marshal(writer):
		writer.setUint8(self.status, 1)
		countinfo = len(self.info)
		writer.setArray(countinfo, 2)
		for i in range(countinfo):
			writer.setMessage(0)
			self.info[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.status = reader.getUint8(1)
		for i in range(reader.getArray(2)):
			msg = FightPropInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.info.append(msg)
